package PLCTranslator;

import PLCSymbolAndScope.PLCSymbols.PLCSymbol;
import antlr4.PLCSTPARSERBaseVisitor;
import antlr4.PLCSTPARSERParser;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PLCTranslator extends PLCSTPARSERBaseVisitor<ArrayList<PLCSymbol>> {

    @Override public ArrayList<PLCSymbol> visitVar_decls(PLCSTPARSERParser.Var_declsContext ctx) {
        return visitChildren(ctx);
    }

    @Override public ArrayList<PLCSymbol> visitVardeclinit(PLCSTPARSERParser.VardeclinitContext ctx) {

        visit(ctx.simple_spec_init());

        visit(ctx.variable_list());

        return new ArrayList<>();
    }

    @Override public ArrayList<PLCSymbol> visitVariable_list(PLCSTPARSERParser.Variable_listContext ctx) {
        //

        for (PLCSTPARSERParser.Variable_nameContext variable_nameContext : ctx.variable_name()) {

            System.out.println(variable_nameContext.getText());

        }

        return new ArrayList<>();
    }

    @Override public ArrayList<PLCSymbol> visitSimple_spec_init(PLCSTPARSERParser.Simple_spec_initContext ctx) {
        //


        return new ArrayList<>(); }
}
